// 字典类别
import request from "@/api/request";

// 查询字典分类
export const query_zdcategory = (params) => {
  return request({
    url: "/essentialdata/ddc/selectAll",
    method: "post",
    data: params,
  });
};

// 新增字典分类
export const add_zdcategory = (params) => {
  return request({
    url: "/essentialdata/ddc/insert",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json" },
  });
};

// 修改字典分类
export const update_zdcategory = (params) => {
  return request({
    url: "/essentialdata/ddc/update",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json" },
  });
};

// 删除字典分类
export const delete_zdcategory = (params) => {
  return request({
    url: `/essentialdata/ddc/delete/${params}`,
    method: "post",
    data: params,
  });
};

// 批量查询字典可选择分类
export const query_zdSelectcategory = (params) => {
  return request({
    url: "/essentialdata/ddc/selectAllInquire",
    method: "post",
    data: params,
  });
};

// 查询字典分类详情
export const query_zdDetails = (params) => {
  return request({
    url: `/essentialdata/ddc/selectDetails/${params}`,
    method: "post",
    data: params,
  });
};
